package cn.wolfcode.luowowo.article.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;

@Getter@Setter
public class TravelQuery extends QueryObject {
    private Long userId;
    private Long destId;
    private int orderType = 1;
    private int travelTimeType = -1;
    private int perExpendType = -1;
    private int dayType = -1;
    private int state = -1;
    public TravelCondition getTravelTime(){
        return TravelCondition.TRAVEL_TIME_TYPE.get(travelTimeType);
    }
    public TravelCondition getPerExpend(){
        return TravelCondition.PER_EXPEND_TYPE.get(perExpendType);
    }
    public TravelCondition getDay(){
        return TravelCondition.DAY_TYPE.get(dayType);
    }
    public String getOrder(){
        return orderType == 1? "releaseTime desc":"viewnum desc";
    }
}
